home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-09 | 875 b | 37 lines | [TEXT/MEDT] |
- MODULE WindowExample; (* general window demo (refreshing windows) *)
-
- FROM Windows IMPORT Window, PlaceOnTop;
- FROM TerminalIn IMPORT Read;
- IMPORT TextWindows;
- IMPORT GraphicWindows;
-
- VAR a,b : Window;
- Ok : BOOLEAN;
- ch : CHAR;
-
- PROCEDURE RestoreGraphic(w : Window);
- BEGIN
- GraphicWindows.Circle(w,150,150,100);
- END RestoreGraphic;
-
- PROCEDURE RestoreText(w : Window);
- BEGIN
- TextWindows.SetPos(w,10,2);
- TextWindows.WriteString(w,"This is an example for restoring windows.");
- END RestoreText;
-
- BEGIN
- GraphicWindows.OpenGraphicWindow(a,0,0,300,300,"Graphic",RestoreGraphic);
- TextWindows.OpenTextWindow(b,20,20,300,300,"Text");
- TextWindows.AssignRestoreProc(b,RestoreText);
- REPEAT
- PlaceOnTop(a);
- Read(ch);
- PlaceOnTop(b);
- Read(ch)
- UNTIL (ch < " ");
- TextWindows.CloseTextWindow(b);
- GraphicWindows.CloseGraphicWindow(a);
- END WindowExample.
-
-